let ErrorUtils = require('../utils/error/ErrorUtils');
let AdminUserService = require('../service/adminUser');
let EmailService = require('../service/email');
let ResponseUtils = require('../utils/ResponseUtils');
const {infoLogger, errorLogger} = require('../config').logger;
class AdminUserController {
    /**
     * 用户基本信息保存
     * @param ctx
     * @returns {Promise<void>}
     */
    static async saveBaseUserInfo(ctx) {
        let result = await AdminUserService.saveBaseUserInfo(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async findBaseUserInfo(ctx) {
        let result = await AdminUserService.findBaseUserInfo(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async saveAuthType(ctx){
        let result = await AdminUserService.saveAuthType(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async saveLearningExperience(ctx) {
        let result = await AdminUserService.saveLearningExperience(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async findLearningUserInfo(ctx) {
        let result = await AdminUserService.findLearningUserInfo(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async saveUploadPic(ctx) {
        let result = await AdminUserService.saveUploadPic(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async findUploadPic(ctx) {
        let result = await AdminUserService.findUploadPic(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async updateUserInfo(ctx) {
        let result = await AdminUserService.updateUserInfo(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async updatePassword(ctx) {
        let result = await AdminUserService.updatePassword(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async findUserInfo(ctx) {
        let result = await AdminUserService.findUserInfo(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async confirmApply(ctx) {
        let result = await AdminUserService.confirmApply(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async findApplyList(ctx) {
        let result = await AdminUserService.findApplyList(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async findPayDetail(ctx) {
        let result = await AdminUserService.findPayDetail(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async findPayList(ctx) {
        let result = await AdminUserService.findPayList(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async createPayOrder(ctx) {
        let result = await AdminUserService.createPayOrder(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async findLiuyanList(ctx) {
        let result = await AdminUserService.findLiuyanList(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
}

module.exports = AdminUserController;